<?php
namespace app\common\enum;

class OrderRefundStatus extends Status
{
	protected static $options = [
		-1   => '取消退款',
        0    => '申请退款',
        1    => '退款成功',

        //卖家拒绝退款
        2    => '卖家拒绝退款',
        

        //退货退款
        3    => '等待买家退货',
        4    => '退货中',
        5    => '卖家已签收，等待卖家退款',
        6    => '退货异常，卖家拒绝退货',
        
        //申请管理员介入
        7    => '申请平台介入',

        //管理员拒绝退款
        8    => '平台拒绝退款',

        //管理员同意退款
        9    => '等待买家退货',
        10   => '退货中',
        11   => '卖家已签收，等待卖家退款',
        12   => '退货异常，卖家拒绝退货',

        //管理员再次介入
        13   => '申请平台介入',
        14   => '平台拒绝退款'
    ];

    protected static $codeOptions = [
    	'quxiaotuikuan'            => -1,
    	'senqingtuikuang'          => 0,
    	'tuikuangchenggong'        => 1,
    	'maijiajujuetuikuan'       => 2,
    	'dengdaimaijiatuihuo'      => 3,
    	'tuihuozhong'              => 4,
    	'maijiayiqianshou'         => 5,
    	'tuihuomaijiajujue'        => 6,
    	'shenqingguanliyuanjieru'  => 7,
    	'guanliyuanjujuetuikuan'   => 8,
    	'dengdaimaijiatuihuo2'     => 9,
    	'tuihuozhong2'             => 10,
    	'maijiayiqianshou2'        => 11,
    	'tuihuomaijiajujue2'       => 12,
    	'shenqingguanliyuanjieru2' => 13,
    	'guanliyuanjujuetuikuan2'  => 14
    ];

    //已退款订单
    public function refunded() {
        return [1];
    }

    //已拒绝退款单
    public function refuse() {
        return [8, 14];
    }

    //已取消退款单
    public function abolish() {
        return [-1];
    }

    //可重新申请退款的退款单
    public function reapply() {
        return [8, 14, -1];
    }

    //已完成退款单
    public function over() {
        return [-1, 1, 8, 14];
    }
}
